

<form nz-form #validateForm="ngForm" (ngSubmit)="submitForm()" nzLayout="horizontal" autocomplete="off">
    <!-- 模态框头部 -->
    <div class="modal-header">
        <div class="modal-title">
            <i class="anticon anticon-medicine-box mr-sm"></i>
            <span *ngIf="entity.id">{{l('Edit')}}</span>
            <span *ngIf="!entity.id">{{l('Create')}}</span>
        </div>
    </div>
    <!-- 模态框内容 -->
    <fieldset>
        <!-- 提示信息 -->
        <!-- <nz-alert nzType="info" nzCloseable [nzShowIcon]="true" nzMessage="l('我想提示点什么内容给你说')"></nz-alert> -->
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="appName">{{l('AppName')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="appName" #appName="ngModel"
                                   [(ngModel)]="entity.appName"
                                   [placeholder]="l('AppName')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="appName.control.dirty&&appName.control.errors">
                                                                <ng-container *ngIf="appName.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="versionName">{{l('VersionName')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="versionName" #versionName="ngModel"
                                   [(ngModel)]="entity.versionName"
                                   [placeholder]="l('VersionName')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="versionName.control.dirty&&versionName.control.errors">
                                                                <ng-container *ngIf="versionName.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="versionCode">{{l('VersionCode')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="versionCode" #versionCode="ngModel"
                                   [(ngModel)]="entity.versionCode"
                                   [placeholder]="l('VersionCode')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="versionCode.control.dirty&&versionCode.control.errors">
                                                                <ng-container *ngIf="versionCode.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="versionDesc">{{l('VersionDesc')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <input nz-input name="versionDesc" #versionDesc="ngModel"
                                   [(ngModel)]="entity.versionDesc"
                                   [placeholder]="l('VersionDesc')"  required >

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="versionDesc.control.dirty&&versionDesc.control.errors">
                                                                <ng-container *ngIf="versionDesc.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>
            <nz-form-item nz-row>
                    <nz-form-label nz-col [nzSm]="6" [nzXs]="24" nzRequired nzFor="deviceType">{{l('DeviceType')}}</nz-form-label>
                <nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
                            <nz-select name="deviceType" #deviceType="ngModel"
                                       [(ngModel)]="entity.deviceType" nzAllowClear
                                       [nzPlaceHolder]="l('DeviceType')"  required  style="width: 120px;">
                                <!-- your select option -->
                                <!--
                                <nz-option [nzValue]="0" nzLabel="男"></nz-option>
                                <nz-option [nzValue]="1" nzLabel="女"></nz-option>
                                -->
                                <!-- <nz-option *ngFor="let option of optionList" [nzValue]="option" [nzLabel]="option.label"></nz-option>                    -->
                            </nz-select>

                            <!-- 校验 -->
                            <nz-form-explain *ngIf="deviceType.control.dirty&&deviceType.control.errors">
                                                                <ng-container *ngIf="deviceType.control.hasError('required')">{{l('CanNotNull')}}</ng-container>
                            </nz-form-explain>

                </nz-form-control>
            </nz-form-item>

    </fieldset>
    <!-- 模态框底部 -->
    <div class="modal-footer">
        <button nz-button [nzType]="'default'" type="button" (click)="close()" [disabled]="saving">
            <i class="anticon anticon-close-circle-o"></i> {{l("Cancel")}}
        </button>
        <button nz-button [nzType]="'primary'" type="submit" [disabled]="!validateForm.form.valid|| saving" [nzLoading]="saving">
            <i class="anticon anticon-save" *ngIf="!saving"></i> {{l("Save")}}
        </button>
    </div>
</form>





